import ddddocr

import time


start = time.time() # 开始时间

# 1. 创建DdddOcr对象
ocr = ddddocr.DdddOcr(show_ad=False)

# 2. 读取图片
with open('验证码.jpeg', 'rb') as f:
    img = f.read()

# 3. 识别图片内验证码并返回字符串
result = ocr.classification(img)
print("识别结果：",result)

end = time.time()
print("耗时：%s 秒" % str(start-end))

